﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using DnD.ViewModels;

namespace DnD
{
    public partial class LoginPage : PhoneApplicationPage
    {
        public LoginPage()
        {
            InitializeComponent();

            DataContext = new UserViewModel(this);
        }

        protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
        {
            ((UserViewModel)DataContext).cancelLogin();
            base.OnBackKeyPress(e);
        }
    }
}